home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
util
/
cdity
/
ModeProSrc.lha
/
Daemon
/
MPLocale.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-11-22
|
845b
|
48 lines
#define CATCOMP_ARRAY
#include "MP.h"
STRPTR LibErrorString,
LibNameVerFmt,
LibOk;
extern struct Catalog *Catalog;
void InitStrings(void)
{
LibErrorString=GetString(MSG_REQ_COULDNT_OPEN_LIBS);
LibNameVerFmt=GetString(MSG_REQ_NAME_VER_FMT);
LibOk=GetString(MSG_REQ_OK);
}
struct CatCompArrayType *CCA;
STRPTR GetString(LONG stringNum)
{
STRPTR builtIn;
LONG dir=1;
if(!stringNum)
return(0);
if(!CCA)
CCA=CatCompArray;
if(CCA->cca_ID>stringNum)
dir=-1;
// printf("ID=%d\n",stringNum);
while (CCA->cca_ID != stringNum)
{
// printf("%7d - %8x : %s\n",CCA->cca_ID,CCA->cca_Str,CCA->cca_Str);
CCA+=dir;
}
builtIn = CCA->cca_Str;
// printf("%7d %s\n",CCA->cca_ID,CCA->cca_Str);
if (LocaleBase)
return(GetCatalogStr(Catalog,stringNum,builtIn));
return(builtIn);
}